<!DOCTYPE HTML>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<title></title>
		<link rel="stylesheet" type="text/css" href="../../../css/aui/aui.css" />
		<style type="text/css">
		</style>
	</head>
	<body>
		<div id="main" style="width: 100%;height:100%;"></div>
	</body>
	<script type="text/javascript" src="../../../script/echarts.min.js"></script>
	<script type="text/javascript">
		var base = +new Date(2015, 9, 3);
		var oneDay = 24 * 3600 * 1000;
		var date = [];
		var data = [Math.random() * 150];
		for (var i = 1; i < 100; i++) {
			var now = new Date(base += oneDay);
			date.push([now.getFullYear(), now.getMonth() + 1, now.getDate()].join('-'));
			data.push((Math.random() - 0.4) * 20 + data[i - 1]);
		}
		option = {
			title : {
				x : 'center',
				text : '某楼盘销售情况',
			},
			legend : {
				top : 'bottom',
				data : ['意向']
			},
			toolbox : {
				show : true,
				feature : {
					mark : {
						show : true
					},
					dataView : {
						show : true,
						readOnly : false
					},
					magicType : {
						show : true,
						type : ['line', 'bar', 'stack', 'tiled']
					},
					restore : {
						show : true
					},
					saveAsImage : {
						show : true
					}
				}
			},
			xAxis : [{
				type : 'category',
				boundaryGap : false,
				data : date
			}],
			yAxis : [{
				type : 'value',
				max : 500
			}],
			dataZoom : {
				type : 'inside',
				start : 60,
				end : 80
			},
			series : [{
				name : '成交',
				type : 'line',
				smooth : true,
				symbol : 'none',
				stack : 'a',
				areaStyle : {
					normal : {}
				},
				data : data
			}]
		};
		// 基于准备好的dom，初始化echarts实例
		var myChart = echarts.init(document.getElementById('main'));
		// 使用刚指定的配置项和数据显示图表。
		myChart.setOption(option);
	</script>
</html>